package park;

import java.util.Scanner;

public class J09SungJuk {
	
	public static void main(String[]args){
		
		//메서드를 이용한 성적처리
		
		String name = "";
		int kor=0,eng=0,mat=0,tot=0;
		double avg=0;
		char grd=' ';
		Scanner sc = null;
		String result="";
		
		//성적입력	
		inputSungJuk(sc,name,kor,eng,mat);
		
		//성적처리
		getTotal(kor, eng, mat, tot);
		getAvgerage(tot, avg);
		getGrade(avg, grd);
		
		//결과출력
		System.out.println(name);
		System.out.println(kor);
		System.out.println(eng);
		System.out.println(mat);
		System.out.println(tot);
		System.out.println(avg);
		System.out.println(grd);
		
	} //메인끝
	
	public static void inputSungJuk(
		Scanner sc,String name,
		int kor,int eng,int mat){
		
		sc = new Scanner(System.in);
		System.out.println("이름을 입력하세요");
		name = sc.next(); // 이름 입력받음

		System.out.println("국어점수 입력하세요");
		kor = sc.nextInt();

		System.out.println("영어점수 입력하세요");
		eng = sc.nextInt();

		System.out.println("수학점수 입력하세요");
		mat = sc.nextInt();
		
		sc.close();
		
	}//inputSungJuk의 끝
	
	
	public static void getTotal(
			int kor,int eng,int mat,int tot	){	
			tot = kor + eng + mat;
		}//getTotal의 끝
			
	public static void getAvgerage(
			int tot	,double avg){
			
			avg = (double) tot / 3;
			System.out.println("평균점수 : " + avg);
			System.out.println();
			
		}//getAvgerage의 끝
		
	 public static void getGrade(
			double avg, char grd){	

			switch((int)avg/10){
			case 10:
			case 9:grd = '수';break;
			case 8:grd = '우';break;
			case 7:grd = '미';break;
			case 6:grd = '양';break;
			default: grd ='가';
			
		}//스위치문의 끝	
			
	} //getGrade 끝
		
			
	
	
	

} // 클래스의 끝
